<%
   filter_id = widget_properties['filter']
   filter = Internal.issues.findIssueFilterById(filter_id.to_i)
   if filter
     if Internal.issues.isUserAuthorized(filter)
       search_options = {}
       search_options['filter'] = filter_id
       @widget_title = link_to h(filter.name), {:controller => 'issues', :action => 'filter', :id => filter.id}
%>
    <% if widget_properties['displayFilterDescription'] && !filter.description.blank? %>
      <div style="padding-bottom: 5px">
        <span class="note"><%= h filter.description -%></span>
      </div>
    <% end %>

    <%= render :partial => 'project/widgets/issues/issues_list_widget',
               :locals => {:search_options => search_options, :widget_id => widget.id.to_s, :widget_properties => widget_properties} %>
  <%
     end
   else
  %>
  <p><%= image_tag 'warning.png' %> <%= message 'widget.issue_filter.unknown_filter_warning' -%></p>
<%
   end
%>
